package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品对象 sys_item
 *
 * @author silencezheng
 * @date 2022-10-29
 */
public class SysItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品ID */
    private Long id;

    /** 分类ID */
    @Excel(name = "分类ID")
    private Long categoryId;
    private String categoryName;

    /** 商品编号 */
    @Excel(name = "商品编号")
    private String sn;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** 图片 */
    @Excel(name = "图片")
    private String picture;

    /** 描述 */
    private String description;

    /** 价格 */
    @Excel(name = "价格")
    private BigDecimal price;

    /** 库存 */
    @Excel(name = "库存")
    private Long stock;

    @Excel(name = "是否上架(N否，Y是)")
    private String isOnsale;

    /** 损耗类型（1过期，2变质） */
    @Excel(name = "损耗类型", readConverterExp = "1=过期，2变质")
    private String wastageType;

    /** 损耗时间 */
    private Date wastageTime;

    @Excel(name = "是否损耗(N否，Y是)")
    private String isWastage;

    /** 销量计数 */
    @Excel(name = "销量计数")
    private Long sellCount;

    /** 上架时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date onsaleTime;

    /** 删除标志（0代表存在 1代表删除） */
    private String delFlag;

    /** 商品分类信息 */
    private List<SysItemCategory> sysItemCategoryList;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }
    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }
    public void setSn(String sn)
    {
        this.sn = sn;
    }

    public String getSn()
    {
        return sn;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setPicture(String picture)
    {
        this.picture = picture;
    }

    public String getPicture()
    {
        return picture;
    }
    public void setDescription(String description)
    {
        this.description = description;
    }

    public String getDescription()
    {
        return description;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setStock(Long stock)
    {
        this.stock = stock;
    }

    public Long getStock()
    {
        return stock;
    }
    public void setIsOnsale(String isOnsale)
    {
        this.isOnsale = isOnsale;
    }

    public String getIsOnsale()
    {
        return isOnsale;
    }
    public void setWastageType(String wastageType)
    {
        this.wastageType = wastageType;
    }

    public String getWastageType()
    {
        return wastageType;
    }
    public void setWastageTime(Date wastageTime)
    {
        this.wastageTime = wastageTime;
    }

    public Date getWastageTime()
    {
        return wastageTime;
    }
    public void setIsWastage(String isWastage)
    {
        this.isWastage = isWastage;
    }

    public String getIsWastage()
    {
        return isWastage;
    }
    public void setSellCount(Long sellCount)
    {
        this.sellCount = sellCount;
    }

    public Long getSellCount()
    {
        return sellCount;
    }
    public void setOnsaleTime(Date onsaleTime)
    {
        this.onsaleTime = onsaleTime;
    }

    public Date getOnsaleTime()
    {
        return onsaleTime;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public List<SysItemCategory> getSysItemCategoryList()
    {
        return sysItemCategoryList;
    }

    public void setSysItemCategoryList(List<SysItemCategory> sysItemCategoryList)
    {
        this.sysItemCategoryList = sysItemCategoryList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("categoryId", getCategoryId())
            .append("sn", getSn())
            .append("name", getName())
            .append("picture", getPicture())
            .append("description", getDescription())
            .append("price", getPrice())
            .append("stock", getStock())
            .append("isOnsale", getIsOnsale())
            .append("wastageType", getWastageType())
            .append("wastageTime", getWastageTime())
            .append("isWastage", getIsWastage())
            .append("sellCount", getSellCount())
            .append("onsaleTime", getOnsaleTime())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("sysItemCategoryList", getSysItemCategoryList())
            .toString();
    }
}
